package com.yinpeng;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * Created by yinpeng on 2020/06/25
 * MapperScan注解
 * @Retention(RetentionPolicy.RUNTIME)
 * @Target(ElementType.TYPE)
 * @Documented
 * @Import(MapperScannerRegistrar.class)
 *
 *
 * 当加入注解 MapperScan 会执行MapperScannerRegistrar.java这个类
 * 执行位置是在Spring容器初始化完成以后，进行注解扫描，扫描到Import注解后执行MapperScannerRegistrar内部代码，然后在执行一个调用父类的doScan进行类的扫描
 */
@MapperScan
public class YinpengMapperScanTest {

	public static void main(String[] args) {
		AnnotationConfigApplicationContext ac = new AnnotationConfigApplicationContext();
	}
}
